import cv2
image=cv2.imread("river.png")
t1,dst1=cv2.threshold(image,127,255,cv2.THRESH_BINARY)
t2,dst2=cv2.threshold(image,127,255,cv2.THRESH_BINARY_INV)
t3,dst3=cv2.threshold(image,127,255,cv2.THRESH_TOZERO)
t4,dst4=cv2.threshold(image,127,255,cv2.THRESH_TOZERO_INV)
t5,dst5=cv2.threshold(image,127,255,cv2.THRESH_TRUNC)
cv2.imshow('Input',image)
cv2.imshow('BINARY',dst1)
cv2.imshow('BINARY_INV',dst2)
cv2.imshow('TOZERO',dst3)
cv2.imshow('TOZERO_INV',dst4)
cv2.imshow('IRUNC',dst5)
cv2.waitKey()
cv2.destroyAllWindows()